<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>navigation-list-item-hover-and-focus-effect</title>
    <style>
        body,html {
            height: 100%;
            width: 100%;
            background-color: #535455;
        }
        .hover-nav > .nav-list{
            list-style: none;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
        .hover-nav .nav-list-item {
            float: left;
        }
        .hover-nav .nav-list-item .nav-list-item-link {
            position: relative;
            display: block;
            color: #fff;
            text-align: center;
            padding: 8px 12px;
            text-decoration: none;
            z-index: 0;
        }
        .nav-list-item .nav-list-item-link::before {
            position: absolute;
            content: "";
            width: 100%;
            height: 100%;
            bottom: 0;
            left: 0;
            background-color: #2683f6;
            z-index: -1;
            transform: scale(0);
            transition: transform .5s ease-in-out;
        }
        .nav-list-item-link:hover::before,
        .nav-list-item-link:focus::before {
            transform: scale(1);
        }
    </style>
</head>
<body>
    <nav class="hover-nav">
        <ul class="nav-list">
            <li class="nav-list-item"><a href="#" class="nav-list-item-link">Home</a></li>
            <li class="nav-list-item"><a href="#" class="nav-list-item-link">About</a></li>
            <li class="nav-list-item"><a href="#" class="nav-list-item-link">Contact</a></li>
        </ul>
    </nav>
</body>
</html>